import request, {METHODS} from '@/service/request';
import envConf from '@/conf/env.conf';

/**
 * 获取名片完整信息
 */
export function login({ data, success, fail, complete}) {
    return request({
        url: `xcxapi/Login`,
        method: METHODS.POST,
        data,
        success,
        fail,
        complete,
    });
}

/**
 * 获取用户信息
 */
export function getUserInfo({ data, success, fail, complete}) {
    return request({
        url: `xcxapi/member`,
        data,
        success,
        fail,
        complete,
    });
}

/**
 * 获取用户信息
 */
export function getUserVipInfo({ data, success, fail, complete}) {
    return request({
        url: `xcxapi/memberInfo`,
        data,
        success,
        fail,
        complete,
    });
}

/**
 * 绑定手机号
 */
export function bindPhone({ data, success, fail, complete}) {
    return request({
        url: `xcxapi/phone`,
        method: METHODS.POST,
        data,
        success,
        fail,
        complete,
    });
}


/**
 * 更换手机号
 */
export function putPhone({ data, success, fail, complete}) {
    return request({
        url: `xcxapi/phone`,
        method: METHODS.PUT,
        data,
        success,
        fail,
        complete,
    });
}


/**
 * 验证手机号验证码
 */
export function vCode({ data, success, fail, complete}) {
    return request({
        url: `xcxapi/vCode`,
        method: METHODS.POST,
        data,
        success,
        fail,
        complete,
    });
}